<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>VR Sketch Design: Y:/Coding/Unity/VRDesignProject/Assets/Scripts/ControllerActions/CreateByController.cs 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">VR Sketch Design
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">VR Project</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b93ca4f67e5c4f3d8967bcc66a8efe61.html">Y:</a></li><li class="navelem"><a class="el" href="dir_657949dcc09204b591ba08b2dd60005a.html">Coding</a></li><li class="navelem"><a class="el" href="dir_9e3bf1a2f1e8bb1f1076cb3a500c0924.html">Unity</a></li><li class="navelem"><a class="el" href="dir_d92c12ce3d70d23921038a5d2ecff28d.html">VRDesignProject</a></li><li class="navelem"><a class="el" href="dir_bbf63476caace77856cc7cbaedc98ba5.html">Assets</a></li><li class="navelem"><a class="el" href="dir_a6ab9145be13875259d1d9e44e1e8835.html">Scripts</a></li><li class="navelem"><a class="el" href="dir_9eb04459ffa80765a164874b47dfec96.html">ControllerActions</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">CreateByController.cs</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_create_by_controller_8cs.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="keyword">using</span> System.Collections;</div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="keyword">using</span> System.Collections.Generic;</div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="keyword">using</span> UnityEngine;</div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="keyword">using</span> VRTK;</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="keyword">using</span> VRTK.GrabAttachMechanics;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">using</span> VRTK.SecondaryControllerGrabActions;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">using</span> System;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_create_by_controller.html">    9</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_create_by_controller.html">CreateByController</a> : <a class="code" href="class_controller_action.html">ControllerAction</a></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;{</div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">   11</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">State</a></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    {</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        Bottom, Height, Finish</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    };</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a943de61defc02fb75f0c785a8a55da05">   16</a></span>&#160;    <span class="keyword">public</span> GameObject <a class="code" href="class_create_by_controller.html#a943de61defc02fb75f0c785a8a55da05">rightControllerScriptAlias</a>;  <span class="comment">// this = leftController</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">   17</a></span>&#160;    <span class="keyword">private</span> GameObject <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>;</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">   18</a></span>&#160;    <span class="keyword">private</span> Transform <a class="code" href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">leftController</a>, <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">   19</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">float</span> <a class="code" href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">scale</a> = 1.0f;</div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#af8655f92691dd897f4e0dfb9615c3432">   20</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">float</span> <a class="code" href="class_create_by_controller.html#af8655f92691dd897f4e0dfb9615c3432">forwardDistance</a> = 0f;</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a4e97c760936e43a17bbc4c8fb396716b">   21</a></span>&#160;    <span class="keyword">private</span> <a class="code" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">State</a> <a class="code" href="class_create_by_controller.html#a4e97c760936e43a17bbc4c8fb396716b">state</a>;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a13e8b949980f9292524b58f41cba6a1e">   23</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="class_create_by_controller.html#a13e8b949980f9292524b58f41cba6a1e">BOTTOM_Y</a> = 0.002f;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="comment">//public class CreateActionEventArgs : EventArgs</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="comment">//{</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="comment">//    public PrimitiveType type { get; set; }</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="comment">//}</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="comment">//private GameObject tmp;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a33b6f2f907eb3afa756dbd80fa6e74a6">   32</a></span>&#160;    [HideInInspector] <span class="keyword">public</span> PrimitiveType <a class="code" href="class_create_by_controller.html#a33b6f2f907eb3afa756dbd80fa6e74a6">type</a> = PrimitiveType.Cube;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="comment">// Start is called before the first frame update</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a039c259cfc65e18f2eab60b906fdfc66">   35</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a039c259cfc65e18f2eab60b906fdfc66">OnEnable</a>()</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    {</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">leftController</a> = transform;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a> = <a class="code" href="class_create_by_controller.html#a943de61defc02fb75f0c785a8a55da05">rightControllerScriptAlias</a>.transform;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">scale</a> = 1.0f;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <a class="code" href="class_create_by_controller.html#a4e97c760936e43a17bbc4c8fb396716b">state</a> = <a class="code" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">State</a>.Bottom;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="comment">//lastLen = CalcDistanceSqr();</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="comment">//tmp = GameObject.CreatePrimitive(PrimitiveType.Sphere);</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="comment">//tmp.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="comment">// 注册手柄事件</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        VRTK_ControllerEvents conEvt = <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>.GetComponent&lt;VRTK_ControllerEvents&gt;();</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        conEvt.TriggerClicked += <span class="keyword">new</span> ControllerInteractionEventHandler(<a class="code" href="class_create_by_controller.html#ae65992af86d5e2f9029ed8cf6503d71d">DoTriggerClicked</a>);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="comment">// 预创建</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <a class="code" href="class_create_by_controller.html#a8ec7f83cf3b27ccb9c5c7e6325d95dac">PreCreate</a>();</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    }</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#abf267543b2012417d41da0f844ac6b96">   55</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#abf267543b2012417d41da0f844ac6b96">OnDisable</a>()</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>.GetComponent&lt;VRTK_ControllerEvents&gt;() == <span class="keyword">null</span>)</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            Debug.LogError(<span class="stringliteral">&quot;VRTK_ControllerEvent component miss&quot;</span>);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        }</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="comment">// 取消注册手柄事件</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        VRTK_ControllerEvents conEvt = <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>.GetComponent&lt;VRTK_ControllerEvents&gt;();</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        conEvt.TriggerClicked -= <a class="code" href="class_create_by_controller.html#ae65992af86d5e2f9029ed8cf6503d71d">DoTriggerClicked</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    }</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#ae65992af86d5e2f9029ed8cf6503d71d">   67</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#ae65992af86d5e2f9029ed8cf6503d71d">DoTriggerClicked</a>(<span class="keywordtype">object</span> sender, ControllerInteractionEventArgs e)</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="class_create_by_controller.html#a4e97c760936e43a17bbc4c8fb396716b">state</a>++;       <span class="comment">// 切换到下一状态</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    }</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="comment">// Update is called once per frame</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a643e57173d235984b8d73f3c6c9766cb">   73</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a643e57173d235984b8d73f3c6c9766cb">Update</a>()</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    {</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="comment">// calc vector between leftController and rightController</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="comment">//Debug.Log(state);</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="comment">// 状态机</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">switch</span>(<a class="code" href="class_create_by_controller.html#a4e97c760936e43a17bbc4c8fb396716b">state</a>)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">State</a>.Bottom:</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                <a class="code" href="class_create_by_controller.html#a588084d26ec3500431320f3a1b34a77a">UpdateBottom</a>();</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <a class="code" href="class_create_by_controller.html#a60717edeb992c2b26e1a2aacb052e677">UpdatePosition</a>();</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">State</a>.Height:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                <a class="code" href="class_create_by_controller.html#aab9e98486c42060d5fb4e22a322f2f3e">UpdateHeight</a>();</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                <a class="code" href="class_create_by_controller.html#a60717edeb992c2b26e1a2aacb052e677">UpdatePosition</a>();</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">State</a>.Finish:</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                <a class="code" href="class_create_by_controller.html#a339d039ef9ce8eb1388926e76cfdc57f">PostCreate</a>();</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                <span class="comment">//transform.GetComponent&lt;CreateByController&gt;().enabled = false;</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                <a class="code" href="class_controller_action.html#acb0c2fdfd641ce634839e6ce52deddea">OnControllerActionEnd</a>(EventArgs.Empty);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a588084d26ec3500431320f3a1b34a77a">   98</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a588084d26ec3500431320f3a1b34a77a">UpdateBottom</a>()</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    {</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="comment">//Vector3 vecZox = Vector3.ProjectOnPlane(vecLminusR, Vector3.up);  // project on zox plane</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        Vector3 vecLminusR = (<a class="code" href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">leftController</a>.position - <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>.position);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordtype">float</span> lenLength = Mathf.Abs(Vector3.Dot(vecLminusR, Vector3.right)); <span class="comment">// 长</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordtype">float</span> lenWidth = Mathf.Abs(Vector3.Dot(vecLminusR, Vector3.forward));    <span class="comment">// 宽</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale = <span class="keyword">new</span> Vector3(lenLength * <a class="code" href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">scale</a>, <a class="code" href="class_create_by_controller.html#a13e8b949980f9292524b58f41cba6a1e">BOTTOM_Y</a>, lenWidth * <a class="code" href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">scale</a>);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#aab9e98486c42060d5fb4e22a322f2f3e">  111</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#aab9e98486c42060d5fb4e22a322f2f3e">UpdateHeight</a>()</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="comment">// adjust scale (yox plane)</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="comment">//Vector3 vecYox = Vector3.ProjectOnPlane(vecLminusR, Vector3.forward);  // project on yox plane</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="comment">//float lenHeight = Vector3.ProjectOnPlane(vecYox, Vector3.forward).sqrMagnitude;</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        Vector3 vecLminusR = (<a class="code" href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">leftController</a>.position - <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>.position);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordtype">float</span> lenHeight = Mathf.Abs(Vector3.Dot(vecLminusR, Vector3.up));</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale = <span class="keyword">new</span> Vector3(<a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale.x, lenHeight * <a class="code" href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">scale</a>, <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale.z);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="comment">//Debug.Log(lenHeight);</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a60717edeb992c2b26e1a2aacb052e677">  123</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a60717edeb992c2b26e1a2aacb052e677">UpdatePosition</a>()</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="comment">// adjust position</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        Vector3 pos = (<a class="code" href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">leftController</a>.position + <a class="code" href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">rightController</a>.position) / 2;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.position = <span class="keyword">new</span> Vector3(pos.x, pos.y, pos.z + <a class="code" href="class_create_by_controller.html#af8655f92691dd897f4e0dfb9615c3432">forwardDistance</a>);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="comment">//tmp.transform.position = pos;</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">// 创建前，确定创建物体的属性</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a8ec7f83cf3b27ccb9c5c7e6325d95dac">  133</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a8ec7f83cf3b27ccb9c5c7e6325d95dac">PreCreate</a>()</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a> = <span class="keyword">new</span> GameObject();</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="comment">// cube使用自制的（多顶点）</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_create_by_controller.html#a33b6f2f907eb3afa756dbd80fa6e74a6">type</a> == PrimitiveType.Cube)</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        {</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;            <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a> = (GameObject)Resources.Load(<span class="stringliteral">&quot;Prefabs/7PCubeWithUV&quot;</span>);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a> = Instantiate(<a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            <span class="comment">//scale = 0.1f;</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        }</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a> = GameObject.CreatePrimitive(<a class="code" href="class_create_by_controller.html#a33b6f2f907eb3afa756dbd80fa6e74a6">type</a>);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale = <span class="keyword">new</span> Vector3(<a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale.x, <a class="code" href="class_create_by_controller.html#a13e8b949980f9292524b58f41cba6a1e">BOTTOM_Y</a>, <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.transform.localScale.z);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.GetComponent&lt;MeshRenderer&gt;().material = Resources.Load&lt;Material&gt;(<span class="stringliteral">&quot;Materials/PreCreate&quot;</span>);     <span class="comment">// 荧光绿色</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    }</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a339d039ef9ce8eb1388926e76cfdc57f">  151</a></span>&#160;    <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a339d039ef9ce8eb1388926e76cfdc57f">PostCreate</a>()</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    {</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="comment">// 顶点修改</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.GetComponent&lt;MeshRenderer&gt;().material = Resources.Load&lt;Material&gt;(<span class="stringliteral">&quot;Materials/Default&quot;</span>);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="comment">// 允许抓取</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        VRTK_InteractableObject interactable = <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.AddComponent&lt;<a class="code" href="class_interactable_object.html">InteractableObject</a>&gt;();    <span class="comment">// 允许抓取</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        interactable.enabled = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        interactable.isGrabbable = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        interactable.holdButtonToGrab = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        <span class="comment">//interactable.isUsable = true;</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.AddComponent&lt;VRTK_ChildOfControllerGrabAttach&gt;();   <span class="comment">// 一定要加这个，否则物体不会跟着手动</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="comment">//model.AddComponent&lt;VRTK_SwapControllerGrabAction&gt;();</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="comment">// 高亮</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        Outline outline = <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.AddComponent&lt;Outline&gt;();</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        outline.OutlineMode = Outline.Mode.OutlineAll;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        outline.OutlineColor = <span class="keyword">new</span> Color32(64, 255, 255, 255);      <span class="comment">// 触碰的颜色</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        outline.OutlineWidth = 6f;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="comment">// 模型不会产生碰撞</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        Rigidbody rb = <a class="code" href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">model</a>.AddComponent&lt;Rigidbody&gt;();</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        rb.isKinematic = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="comment">//model.GetComponent&lt;BoxCollider&gt;().isTrigger = true;</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="comment">//model.AddComponent&lt;VRTK_ChildOfControllerGrabAttach&gt;();   // 一定要加这个，否则物体不会跟着手动</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a7b54e19d9642f74c2c6bff60375e029e">  178</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a7b54e19d9642f74c2c6bff60375e029e">OnCreateCubeClicked</a>()</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    {</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <span class="comment">//CreateActionEventArgs args = new CreateActionEventArgs();</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="comment">//args.type = PrimitiveType.Cube;</span></div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        this.type = PrimitiveType.Cube;     <span class="comment">// 因为订阅器（管理器）的事件处理逻辑本身就是要为脚本设定参数，因此简化这层逻辑，直接在脚本内部确定参数，再执行事件。管理器只需负责脚本的切换</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <a class="code" href="class_controller_action.html#a6555650db283b88f214b210a80783818">OnControllerAtionStart</a>(EventArgs.Empty);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    }</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#a5ccd62eb9c255d80715e79a17f76d9ee">  186</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#a5ccd62eb9c255d80715e79a17f76d9ee">OnCreateSphereClicked</a>()</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    {</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="comment">//CreateActionEventArgs args = new CreateActionEventArgs();</span></div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="comment">//args.type = PrimitiveType.Sphere;</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        this.type = PrimitiveType.Sphere;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <a class="code" href="class_controller_action.html#a6555650db283b88f214b210a80783818">OnControllerAtionStart</a>(EventArgs.Empty);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="class_create_by_controller.html#aa23c5ace0daf9ea414a52a763ead388b">  194</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_create_by_controller.html#aa23c5ace0daf9ea414a52a763ead388b">OnCreateCylinderClicked</a>()</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="comment">//CreateActionEventArgs args = new CreateActionEventArgs();</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <span class="comment">//args.type = PrimitiveType.Cylinder;</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        this.type = PrimitiveType.Cylinder;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <a class="code" href="class_controller_action.html#a6555650db283b88f214b210a80783818">OnControllerAtionStart</a>(EventArgs.Empty);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    }</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;<span class="comment">     * 重写触发事件函数，传入相应的参数</span></div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="comment">//protected override void OnControllerAtionStart(EventArgs e)</span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="comment">//{</span></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="comment">//    //throw new System.NotImplementedException();</span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <span class="comment">//    CreateActionEventArgs args = e as CreateActionEventArgs;</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="comment">//    this.type = args.type;</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="comment">//    base.OnControllerAtionStart(args);</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="comment">//}</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;}</div>
<div class="ttc" id="aclass_controller_action_html"><div class="ttname"><a href="class_controller_action.html">ControllerAction</a></div><div class="ttdoc">功能脚本抽象类，定义功能启动和关闭事件，用于统一管理</div><div class="ttdef"><b>Definition:</b> <a href="_controller_action_8cs_source.html#l00009">ControllerAction.cs:10</a></div></div>
<div class="ttc" id="aclass_controller_action_html_a6555650db283b88f214b210a80783818"><div class="ttname"><a href="class_controller_action.html#a6555650db283b88f214b210a80783818">ControllerAction.OnControllerAtionStart</a></div><div class="ttdeci">virtual void OnControllerAtionStart(EventArgs e)</div><div class="ttdoc">功能开始的事件触发函数</div><div class="ttdef"><b>Definition:</b> <a href="_controller_action_8cs_source.html#l00019">ControllerAction.cs:19</a></div></div>
<div class="ttc" id="aclass_controller_action_html_acb0c2fdfd641ce634839e6ce52deddea"><div class="ttname"><a href="class_controller_action.html#acb0c2fdfd641ce634839e6ce52deddea">ControllerAction.OnControllerActionEnd</a></div><div class="ttdeci">virtual void OnControllerActionEnd(EventArgs e)</div><div class="ttdoc">功能结束的事件触发函数</div><div class="ttdef"><b>Definition:</b> <a href="_controller_action_8cs_source.html#l00032">ControllerAction.cs:32</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html"><div class="ttname"><a href="class_create_by_controller.html">CreateByController</a></div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00009">CreateByController.cs:10</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a039c259cfc65e18f2eab60b906fdfc66"><div class="ttname"><a href="class_create_by_controller.html#a039c259cfc65e18f2eab60b906fdfc66">CreateByController.OnEnable</a></div><div class="ttdeci">void OnEnable()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00035">CreateByController.cs:35</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a13e8b949980f9292524b58f41cba6a1e"><div class="ttname"><a href="class_create_by_controller.html#a13e8b949980f9292524b58f41cba6a1e">CreateByController.BOTTOM_Y</a></div><div class="ttdeci">const float BOTTOM_Y</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00023">CreateByController.cs:23</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a339d039ef9ce8eb1388926e76cfdc57f"><div class="ttname"><a href="class_create_by_controller.html#a339d039ef9ce8eb1388926e76cfdc57f">CreateByController.PostCreate</a></div><div class="ttdeci">void PostCreate()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00151">CreateByController.cs:151</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a33b6f2f907eb3afa756dbd80fa6e74a6"><div class="ttname"><a href="class_create_by_controller.html#a33b6f2f907eb3afa756dbd80fa6e74a6">CreateByController.type</a></div><div class="ttdeci">PrimitiveType type</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00032">CreateByController.cs:32</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a42a500de8267a99e1b82119409532432"><div class="ttname"><a href="class_create_by_controller.html#a42a500de8267a99e1b82119409532432">CreateByController.rightController</a></div><div class="ttdeci">Transform rightController</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00018">CreateByController.cs:18</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a4a8c37184b6d6a91ecf71e49ecf0cfef"><div class="ttname"><a href="class_create_by_controller.html#a4a8c37184b6d6a91ecf71e49ecf0cfef">CreateByController.leftController</a></div><div class="ttdeci">Transform leftController</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00018">CreateByController.cs:18</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a4e97c760936e43a17bbc4c8fb396716b"><div class="ttname"><a href="class_create_by_controller.html#a4e97c760936e43a17bbc4c8fb396716b">CreateByController.state</a></div><div class="ttdeci">State state</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00021">CreateByController.cs:21</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a588084d26ec3500431320f3a1b34a77a"><div class="ttname"><a href="class_create_by_controller.html#a588084d26ec3500431320f3a1b34a77a">CreateByController.UpdateBottom</a></div><div class="ttdeci">void UpdateBottom()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00098">CreateByController.cs:98</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a5ccd62eb9c255d80715e79a17f76d9ee"><div class="ttname"><a href="class_create_by_controller.html#a5ccd62eb9c255d80715e79a17f76d9ee">CreateByController.OnCreateSphereClicked</a></div><div class="ttdeci">void OnCreateSphereClicked()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00186">CreateByController.cs:186</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a60717edeb992c2b26e1a2aacb052e677"><div class="ttname"><a href="class_create_by_controller.html#a60717edeb992c2b26e1a2aacb052e677">CreateByController.UpdatePosition</a></div><div class="ttdeci">void UpdatePosition()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00123">CreateByController.cs:123</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a643e57173d235984b8d73f3c6c9766cb"><div class="ttname"><a href="class_create_by_controller.html#a643e57173d235984b8d73f3c6c9766cb">CreateByController.Update</a></div><div class="ttdeci">void Update()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00073">CreateByController.cs:73</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a6bbb0bceb309090207b2600ff52d0548"><div class="ttname"><a href="class_create_by_controller.html#a6bbb0bceb309090207b2600ff52d0548">CreateByController.model</a></div><div class="ttdeci">GameObject model</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00017">CreateByController.cs:17</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a7b54e19d9642f74c2c6bff60375e029e"><div class="ttname"><a href="class_create_by_controller.html#a7b54e19d9642f74c2c6bff60375e029e">CreateByController.OnCreateCubeClicked</a></div><div class="ttdeci">void OnCreateCubeClicked()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00178">CreateByController.cs:178</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a8ec7f83cf3b27ccb9c5c7e6325d95dac"><div class="ttname"><a href="class_create_by_controller.html#a8ec7f83cf3b27ccb9c5c7e6325d95dac">CreateByController.PreCreate</a></div><div class="ttdeci">void PreCreate()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00133">CreateByController.cs:133</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_a943de61defc02fb75f0c785a8a55da05"><div class="ttname"><a href="class_create_by_controller.html#a943de61defc02fb75f0c785a8a55da05">CreateByController.rightControllerScriptAlias</a></div><div class="ttdeci">GameObject rightControllerScriptAlias</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00016">CreateByController.cs:14</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_aa23c5ace0daf9ea414a52a763ead388b"><div class="ttname"><a href="class_create_by_controller.html#aa23c5ace0daf9ea414a52a763ead388b">CreateByController.OnCreateCylinderClicked</a></div><div class="ttdeci">void OnCreateCylinderClicked()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00194">CreateByController.cs:194</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_aab9e98486c42060d5fb4e22a322f2f3e"><div class="ttname"><a href="class_create_by_controller.html#aab9e98486c42060d5fb4e22a322f2f3e">CreateByController.UpdateHeight</a></div><div class="ttdeci">void UpdateHeight()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00111">CreateByController.cs:111</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_abf267543b2012417d41da0f844ac6b96"><div class="ttname"><a href="class_create_by_controller.html#abf267543b2012417d41da0f844ac6b96">CreateByController.OnDisable</a></div><div class="ttdeci">void OnDisable()</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00055">CreateByController.cs:55</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_ac89dfc27a8a001b7aecfa24f92cb59a3"><div class="ttname"><a href="class_create_by_controller.html#ac89dfc27a8a001b7aecfa24f92cb59a3">CreateByController.scale</a></div><div class="ttdeci">float scale</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00019">CreateByController.cs:19</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_acb9c3795bf5b0467a1b5e3c5d5bd8188"><div class="ttname"><a href="class_create_by_controller.html#acb9c3795bf5b0467a1b5e3c5d5bd8188">CreateByController.State</a></div><div class="ttdeci">State</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00011">CreateByController.cs:12</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_ae65992af86d5e2f9029ed8cf6503d71d"><div class="ttname"><a href="class_create_by_controller.html#ae65992af86d5e2f9029ed8cf6503d71d">CreateByController.DoTriggerClicked</a></div><div class="ttdeci">void DoTriggerClicked(object sender, ControllerInteractionEventArgs e)</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00067">CreateByController.cs:67</a></div></div>
<div class="ttc" id="aclass_create_by_controller_html_af8655f92691dd897f4e0dfb9615c3432"><div class="ttname"><a href="class_create_by_controller.html#af8655f92691dd897f4e0dfb9615c3432">CreateByController.forwardDistance</a></div><div class="ttdeci">float forwardDistance</div><div class="ttdef"><b>Definition:</b> <a href="_create_by_controller_8cs_source.html#l00020">CreateByController.cs:20</a></div></div>
<div class="ttc" id="aclass_interactable_object_html"><div class="ttname"><a href="class_interactable_object.html">InteractableObject</a></div><div class="ttdef"><b>Definition:</b> <a href="_interactable_object_8cs_source.html#l00006">InteractableObject.cs:7</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
